import 'package:flutter_app/bean/file_path_entity.dart';
import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/problem_by_code_entity.dart';

ProblemByCodeEntity $ProblemByCodeEntityFromJson(Map<String, dynamic> json) {
  final ProblemByCodeEntity problemByCodeEntity = ProblemByCodeEntity();
  final String? collectId = jsonConvert.convert<String>(json['collectId']);
  if (collectId != null) {
    problemByCodeEntity.collectId = collectId;
  }
  final String? content = jsonConvert.convert<String>(json['content']);
  if (content != null) {
    problemByCodeEntity.content = content;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    problemByCodeEntity.createBy = createBy;
  }
  final String? createName = jsonConvert.convert<String>(json['createName']);
  if (createName != null) {
    problemByCodeEntity.createName = createName;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    problemByCodeEntity.createTime = createTime;
  }
  final List<FilePathEntity>? fileList =
      jsonConvert.convertListNotNull<FilePathEntity>(json['fileList']);
  if (fileList != null) {
    problemByCodeEntity.fileList = fileList;
  }
  final String? groupId = jsonConvert.convert<String>(json['groupId']);
  if (groupId != null) {
    problemByCodeEntity.groupId = groupId;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    problemByCodeEntity.id = id;
  }
  final String? isSelf = jsonConvert.convert<String>(json['isSelf']);
  if (isSelf != null) {
    problemByCodeEntity.isSelf = isSelf;
  }
  final String? orgId = jsonConvert.convert<String>(json['orgId']);
  if (orgId != null) {
    problemByCodeEntity.orgId = orgId;
  }
  final String? orgName = jsonConvert.convert<String>(json['orgName']);
  if (orgName != null) {
    problemByCodeEntity.orgName = orgName;
  }
  final String? problemCode = jsonConvert.convert<String>(json['problemCode']);
  if (problemCode != null) {
    problemByCodeEntity.problemCode = problemCode;
  }
  final String? problemCodeName =
      jsonConvert.convert<String>(json['problemCodeName']);
  if (problemCodeName != null) {
    problemByCodeEntity.problemCodeName = problemCodeName;
  }
  final String? problemId = jsonConvert.convert<String>(json['problemId']);
  if (problemId != null) {
    problemByCodeEntity.problemId = problemId;
  }
  final String? status = jsonConvert.convert<String>(json['status']);
  if (status != null) {
    problemByCodeEntity.status = status;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    problemByCodeEntity.remark = remark;
  }
  return problemByCodeEntity;
}

Map<String, dynamic> $ProblemByCodeEntityToJson(ProblemByCodeEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['collectId'] = entity.collectId;
  data['content'] = entity.content;
  data['createBy'] = entity.createBy;
  data['createName'] = entity.createName;
  data['createTime'] = entity.createTime;
  data['fileList'] = entity.fileList?.map((v) => v.toJson()).toList();
  data['groupId'] = entity.groupId;
  data['id'] = entity.id;
  data['isSelf'] = entity.isSelf;
  data['orgId'] = entity.orgId;
  data['orgName'] = entity.orgName;
  data['problemCode'] = entity.problemCode;
  data['problemCodeName'] = entity.problemCodeName;
  data['problemId'] = entity.problemId;
  data['status'] = entity.status;
  data['remark'] = entity.remark;
  return data;
}
